//
//  AppController.m
//  SimpleDraw
//
//  Created by David Hatch on 12/9/08.
//  Copyright 2008 __MyCompanyName__. All rights reserved.
//

#import "AppController.h"
#import "PreferenceController.h"

@implementation AppController
+ (void)initialize
{
	NSUserDefaults * d = [NSUserDefaults standardUserDefaults];
	NSMutableDictionary * dict = [NSMutableDictionary dictionary];
	NSData *fgColorAsData = [NSKeyedArchiver archivedDataWithRootObject:[NSColor yellowColor]];
	NSData *bgColorAsData = [NSKeyedArchiver archivedDataWithRootObject:[NSColor greenColor]];
	[dict setObject:fgColorAsData forKey:TESDFgColorKey];
	[dict setObject:bgColorAsData forKey:TESDBgColorKey];
	[dict setValue:[NSNumber numberWithInt:25] forKey:TESDPenSizeKey];
	[d registerDefaults:dict];
}
							 
-(id)init
{
	if(![super init])
		return nil;
	return self;
}
-(IBAction)showInspector:(id)sender
{
	[prefs showWindow:self];
}

@end
